//
//  MYGBaseModel.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/2/29.
//

import UIKit
import HandyJSON

class MYGBaseModel<T: HandyJSON>: HandyJSON {
    var success: Bool = true
    var data: T = T()
    var message: String = ""
    var status = 0
    var code: Int = 0
    var stringData: String?
    var stringArray = [String]()

    required init() {
    }
    func mapping(mapper: HelpingMapper) {
        mapper <<<
            self.message <-- ["msg", "message"]
        mapper <<< self.stringData <-- ["data"]
        mapper <<< self.stringArray <-- ["data"]
        mapper <<< self.data <-- ["data"]
    }
    
}


class MYGEmptyModel: HandyJSON {
    var success: Bool = true
    var data = 0
    var message: String = ""
    var status = 0
    required init() {
    }
}

